#ifndef	COMMON_H
#define COMMON_H

#include "includes.h"


#define SYSTEM_CLOCK	2000000UL
#define DELTA			(unsigned int)(SYSTEM_CLOCK/4096)

#define delay_nop(i)    __delay_cycles(i)
#define delay_us(i)  	__delay_cycles((i*(unsigned long long)SYSTEM_CLOCK)/1000000)
#define delay_ms(i)  	__delay_cycles((i*(unsigned long long)SYSTEM_CLOCK)/1000)
#define delay_s(i)  	__delay_cycles((i*(unsigned long long)SYSTEM_CLOCK)/1)

#define HOST_ADDR	0x01
#define SELF_ADDR	0x02

typedef signed char     int8_t;
typedef signed short    int16_t;
typedef signed long     int32_t;
typedef unsigned char   uint8_t;
typedef unsigned short  uint16_t;
typedef unsigned long   uint32_t;



#endif

